<?php
namespace BoxEdu\Controller\Home;
//use Think\Controller;

class WidgetController extends CommonController
{


    public function comment($topic_id, $type = "topic_id")
    {
        if ($type == "topic_id") {
            $data = $this->model("SnsComment")->where("pid='$topic_id'")->getList();
        } else if ($type == "comment_id") {
            $data = $this->model("SnsComment")->where("comment_id='$topic_id'")->getList();
        }
        $this->commentData = $data['list'];
        $this->display("Widget/comment");
    }

}